home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / asm / a86v401.zip / A06B.DOC < prev    next >
Text File  |  1995-03-05  |  31KB  |  533 lines

  1.                                                               6-9
  2.  
  3. Opcodes    Instruction     Description
  4.  
  5. 67 or nil  A2 (prefix)   3 Use 16-bit address (indexing) in next instruction
  6. 67 or nil  A4 (prefix)   3 Use 32-bit address (indexing) in next instruction
  7. 37         AAA             ASCII adjust AL (carry into AH) after addition
  8. D5 0A      AAD             ASCII adjust before division (AX = 10*AH + AL)
  9. D4 0A      AAM             ASCII adjust after multiply (AL/10: AH=Quo AL=Rem)
  10. 3F         AAS             ASCII adjust AL (borrow from AH) after subtraction
  11.  
  12. 14 ib      ADC AL,ib       Add with carry immediate byte into AL
  13. 15 iv      ADC eAX,iv      Add with carry immediate vword into eAX
  14. 80 /2 ib   ADC eb,ib       Add with carry immediate byte into EA byte
  15. 10 /r      ADC eb,rb       Add with carry byte register into EA byte
  16. 83 /2 ib   ADC ev,ib       Add with carry immediate byte into EA vword
  17. 81 /2 iv   ADC ev,iv       Add with carry immediate vword into EA vword
  18. 11 /r      ADC ev,rv       Add with carry vword register into EA vword
  19. 12 /r      ADC rb,eb       Add with carry EA byte into byte register
  20. 13 /r      ADC rv,ev       Add with carry EA vword into vword register
  21.  
  22. 04 ib      ADD AL,ib       Add immediate byte into AL
  23. 05 iv      ADD eAX,iv      Add immediate vword into eAX
  24. 80 /0 ib   ADD eb,ib       Add immediate byte into EA byte
  25. 00 /r      ADD eb,rb       Add byte register into EA byte
  26. 83 /0 ib   ADD ev,ib       Add immediate byte into EA vword
  27. 81 /0 iv   ADD ev,iv       Add immediate vword into EA vword
  28. 01 /r      ADD ev,rv       Add vword register into EA vword
  29. 02 /r      ADD rb,eb       Add EA byte into byte register
  30. 03 /r      ADD rv,ev       Add EA vword into vword register
  31. 0F 20      ADD4S         N Add CL nibbles BCD, DS:SI into ES:DI (CL even,NZ)
  32.  
  33. 24 ib      AND AL,ib       Logical-AND immediate byte into AL
  34. 25 iv      AND eAX,iv      Logical-AND immediate vword into eAX
  35. 80 /4 ib   AND eb,ib       Logical-AND immediate byte into EA byte
  36. 20 /r      AND eb,rb       Logical-AND byte register into EA byte
  37. 83 /4 ib   AND ev,ib       Logical-AND immediate byte into EA vword
  38. 81 /4 iv   AND ev,iv       Logical-AND immediate vword into EA vword
  39. 21 /r      AND ev,rv       Logical-AND vword register into EA vword
  40. 22 /r      AND rb,eb       Logical-AND EA byte into byte register
  41. 23 /r      AND rv,ev       Logical-AND EA vword into vword register
  42. 63 /r      ARPL ew,rw    2 Adjust RPL of EA word not smaller than RPL of rw
  43.  
  44. 62 /r      BOUND rv,m2v  2 INT 5 if rw not between 2 vwords at [m] inclusive
  45. 0F BC      BSF rv,ev     3 Set rv to lowest position of NZ bit in ev
  46. 0F BD      BSR rv,ev     3 Set rv to highest position of NZ bit in ev
  47. 0F C8+r    BSWAP rd      4 Swap bytes 1,4 and 2,3 of dword register
  48.  
  49. 0F BA/4 ib BT rv/m,ib    3 Set Carry flag to bit # ib of array at rv/m
  50. 0F A3/r    BT rv/m,rv    3 Set Carry flag to bit # rv of array at rv/m
  51. 0F BA/7 ib BTC rv/m,ib   3 Set CF to, then compl bit ib of array at rv/m
  52. 0F BB/r    BTC rv/m,rv   3 Set CF to, then compl bit rv of array at rv/m
  53. 0F BA/6 ib BTR rv/m,     3 Set CF to, then reset bit ib of array at rv/m
  54. 0F B3/r    BTR rv/m,rv   3 Set CF to, then reset bit rv of array at rv/m
  55. 0F BA/5 ib BTS rv/m,ib   3 Set CF to, then set bit ib of array at rv/m
  56. 0F AB/r    BTS rv/m,rv   3 Set CF to, then set bit rv of array at rv/m
  57.                                                              6-10
  58.  
  59. 9A cp      CALL cp         Call far segment, immediate 4- or 6-byte address
  60. E8 cv      CALL cv         Call near, offset relative to next instruction
  61. FF /3      CALL ep         Call far segment, address at EA memory location
  62. FF /2      CALL ev         Call near, offset absolute at EA vword
  63. 0F FF ib   CALL80 ib     N Call 8080-emulation code at INT number ib
  64.  
  65. 98         CBW             Convert byte into word (AH = top bit of AL)
  66. 99         CDQ           3 Convert dword to qword (EDX = top bit of EAX)
  67. F8         CLC             Clear carry flag
  68. FC         CLD             Clear direction flag so SI and DI will increment
  69. FA         CLI             Clear interrupt enable flag; interrupts disabled
  70.  
  71. 0F 12/0    CLRBIT eb,CL  N Clear bit CL of eb
  72. 0F 13/0    CLRBIT ew,CL  N Clear bit CL of ew
  73. 0F 1A/0 ib CLRBIT eb,ib  N Clear bit ib of eb
  74. 0F 1B/0 ib CLRBIT ew,ib  N Clear bit ib of ew
  75. 0F 06      CLTS          2 Clear task switched flag
  76. F5         CMC             Complement carry flag
  77.  
  78. 3C ib      CMP AL,ib       Subtract immediate byte from AL for flags only
  79. 3D iv      CMP eAX,iv      Subtract immediate vword from eAX for flags only
  80. 80 /7 ib   CMP eb,ib       Subtract immediate byte from EA byte for flags only
  81. 38 /r      CMP eb,rb       Subtract byte register from EA byte for flags only
  82. 83 /7 ib   CMP ev,ib       Subtract immediate byte from EA vword for flags only
  83. 81 /7 iv   CMP ev,iv       Subtract immediate vword from EA vword, flags only
  84. 39 /r      CMP ev,rv       Subtract vword register from EA vword for flags only
  85. 3A /r      CMP rb,eb       Subtract EA byte from byte register for flags only
  86. 3B /r      CMP rv,ev       Subtract EA vword from vword register for flags only
  87.  
  88. 0F 26      CMP4S         N Compare CL nibbles BCD, DS:SI - ES:DI (CL even,NZ)
  89. A6         CMPS mb,mb      Compare bytes [SI] - ES:[DI], advance SI,DI
  90. A7         CMPS mv,mv      Compare vwords [SI] - ES:[DI], advance SI,DI
  91. A6         CMPSB           Compare bytes DS:[SI] - ES:[DI], advance SI,DI
  92. A7         CMPSD           Compare dwords DS:[SI] - ES:[DI], advance SI,DI
  93. A7         CMPSW           Compare words DS:[SI] - ES:[DI], advance SI,DI
  94.  
  95. 0F C7 /1   CMPX8 mq      5 If EDXEAX=mq then mq:=ECXEBX, else EAXEDX:=mq
  96. 0F B0 /r   CMPXCHG eb,rb 4 If AL=eb then set eb to rb, else set AL to eb
  97. 0F B1 /r   CMPXCHG ev,rv 4 If eAX=ev then set ev to rv, else set eAX to ev
  98. 0F A2      CPUID         5 If EAX=1 set EDXEAX to CPU identification values
  99. 99         CWD             Convert word to doubleword (DX = top bit of AX)
  100. 98         CWDE          3 Sign-extend word AX to doubleword EAX
  101. 2E         CS (prefix)     Use CS segment for the following memory reference
  102.  
  103. 27         DAA             Decimal adjust AL after addition
  104. 2F         DAS             Decimal adjust AL after subtraction
  105. FE /1      DEC eb          Decrement EA byte by 1
  106. FF /1      DEC ev          Decrement EA vword by 1
  107. 48+rv      DEC rv          Decrement vword register by 1
  108.  
  109. F6 /6      DIV eb          Unsigned divide AX by EA byte (AL=Quo AH=Rem)
  110. F7 /6      DIV ev          Unsigned divide eDXeAX by EA vword (eAX=Quo eDX=Rem)
  111. 3E         DS (prefix)     Use DS segment for the following memory reference
  112.                                                              6-11
  113.  
  114. C8 iw 00   ENTER iw,0    1 Make stack frame, iw bytes local storage, 0 levels
  115. C8 iw 01   ENTER iw,1    1 Make stack frame, iw bytes local storage, 1 level
  116. C8 iw ib   ENTER iw,ib   1 Make stack frame, iw bytes local storage, ib levels
  117. 26         ES (prefix)     Use ES segment for the following memory reference
  118.            F(any)          Floating point set is in Chapter 7
  119. F4         HLT             Halt
  120.  
  121. F6 /7      IDIV eb         Signed divide AX by EA byte (AL=Quo AH=Rem)
  122. F7 /7      IDIV ev         Signed divide eDXeAX by EA vword (eAX=Quo eDX=Rem)
  123. F6 /5      IMUL eb         Signed multiply (AX = AL * EA byte)
  124. F7 /5      IMUL ev         Signed multiply (eDXeAX = eAX * EA vword)
  125. 0F AF /r   IMUL rv,ev    3 Signed multiply ev into rv
  126. 6B /r ib   IMUL rv,ib    1 Signed multiply imm byte into vword register
  127. 69 /r iv   IMUL rv,iv    1 Signed multiply imm vword into vword register
  128. 69 /r iv   IMUL rv,ev,iv 1 Signed multiply (rv = EA vword * imm vword)
  129. 6B /r ib   IMUL rv,ev,ib 1 Signed multiply (rv = EA vword * imm byte)
  130.  
  131. E4 ib      IN AL,ib        Input byte from immediate port into AL
  132. EC         IN AL,DX        Input byte from port DX into AL
  133. E5 ib      IN eAX,ib       Input vword from immediate port into eAX
  134. ED         IN eAX,DX       Input vword from port DX into eAX
  135.  
  136. FE /0      INC eb          Increment EA byte by 1
  137. FF /0      INC ev          Increment EA vword by 1
  138. 40+rv      INC rv          Increment vword register by 1
  139.  
  140. 6C         INS eb,DX     1 Input byte from port DX into [DI], advance DI
  141. 6D         INS ev,DX     1 Input vword from port DX into [DI], advance DI
  142. 6C         INSB          1 Input byte from port DX into ES:[DI], advance DI
  143. 6D         INSD          3 Input dword from port DX into ES:[DI], advance DI
  144. 6D         INSW          1 Input vword from port DX into ES:[DI], advance DI
  145.  
  146. CC         INT 3           Interrupt 3 (trap to debugger) (far call, with flags
  147. CD ib      INT ib          Interrupt numbered by immediate byte    pushed first)
  148. CE         INTO            Interrupt 4 if overflow flag is 1
  149. 0F 08      INVD          4 Invalidate the Data Cache without writing
  150. 0F 01 /7   INVLPG m      4 Invalidate the TLB Entry that points to m
  151. CF         IRET            Interrupt return (far return and pop flags)
  152. CF         IRETD         3 Interrupt return (pop EIP, ECS, Eflags)
  153.  
  154. 77 cb      JA cb           Jump short if above (CF=0 and ZF=0)    above=UNSIGNED
  155. 73 cb      JAE cb          Jump short if above or equal (CF=0)
  156. 72 cb      JB cb           Jump short if below (CF=1)             below=UNSIGNED
  157. 76 cb      JBE cb          Jump short if below or equal (CF=1 or ZF=1)
  158. 72 cb      JC cb           Jump short if carry (CF=1)
  159.  
  160. E3 cb      JCXZ cb         Jump short if CX register is zero
  161. 74 cb      JE cb           Jump short if equal (ZF=1)
  162. E3 cb      JECXZ cb      3 Jump short if ECX register is zero
  163. 7F cb      JG cb           Jump short if greater (ZF=0 and SF=OF) greater=SIGNED
  164. 7D cb      JGE cb          Jump short if greater or equal (SF=OF)
  165. 7C cb      JL cb           Jump short if less (SF>OF)               less=SIGNED
  166. 7E cb      JLE cb          Jump short if less or equal (ZF=1 or SF>OF)
  167.                                                              6-12
  168.  
  169. EB cb      JMP cb          Jump short (signed byte relative to next instruction)
  170. EA cp      JMP cp          Jump far (4- or 6-byte immediate address)
  171. E9 cv      JMP cv          Jump near (vword offset relative to next instruction)
  172. 0F 8n cv   Jcond LONG cv 3 Jump, if condition, to offset >127 away
  173. FF /4      JMP ev          Jump near to EA vword (absolute offset)
  174. FF /5      JMP md          Jump far (4-byte address in memory doubleword)
  175.  
  176. 76 cb      JNA cb          Jump short if not above (CF=1 or ZF=1)
  177. 72 cb      JNAE cb         Jump short if not above or equal (CF=1)
  178. 73 cb      JNB cb          Jump short if not below (CF=0)
  179. 77 cb      JNBE cb         Jump short if not below or equal (CF=0 and ZF=0)
  180. 73 cb      JNC cb          Jump short if not carry (CF=0)
  181.  
  182. 75 cb      JNE cb          Jump short if not equal (ZF=0)
  183. 7E cb      JNG cb          Jump short if not greater (ZF=1 or SF>OF)
  184. 7C cb      JNGE cb         Jump short if not greater or equal (SF>OF)
  185. 7D cb      JNL cb          Jump short if not less (SF=OF)
  186. 7F cb      JNLE cb         Jump short if not less or equal (ZF=0 and SF=OF)
  187.  
  188. 71 cb      JNO cb          Jump short if not overflow (OF=0)
  189. 7B cb      JNP cb          Jump short if not parity (PF=0)
  190. 79 cb      JNS cb          Jump short if not sign (SF=0)
  191. 75 cb      JNZ cb          Jump short if not zero (ZF=0)
  192. 70 cb      JO cb           Jump short if overflow (OF=1)
  193.  
  194. 7A cb      JP cb           Jump short if parity (PF=1)
  195. 7A cb      JPE cb          Jump short if parity even (PF=1)
  196. 7B cb      JPO cb          Jump short if parity odd (PF=0)
  197. 78 cb      JS cb           Jump short if sign (SF=1)
  198. 74 cb      JZ cb           Jump short if zero (ZF=1)
  199.  
  200. 9F         LAHF            Load: AH = flags  SF ZF xx AF xx PF xx CF
  201. 0F 02 /r   LAR rv,ew     2 Load: high(rw) = Access Rights byte, selector ew
  202. C5 /r      LDS rv,ep       Load EA pointer into DS and vword register
  203. 8D /r      LEA rv,m        Calculate EA offset given by m, place in rv
  204. C9         LEAVE         1 Set SP to BP, then POP BP (reverses previous ENTER)
  205. C4 /r      LES rv,ep       Load EA pointer into ES and vword register
  206. 0F B4 /r   LFS rv,ep     3 Load EA pointer into FS and vword register
  207.  
  208. 0F 01 /2   LGDT m        2 Load 6 bytes at m into Global Descriptor Table reg
  209. 0F B5 /r   LGS rv,ep     3 Load EA pointer into GS and vword register
  210. 0F 01 /3   LIDT m        2 Load 6 bytes into Interrupt Descriptor Table reg
  211. 0F 00 /2   LLDT ew       2 Load selector ew into Local Descriptor Table reg
  212. 0F 01 /6   LMSW ew       2 Load EA word into Machine Status Word
  213. F0         LOCK (prefix)   Assert BUSLOCK signal for the next instruction
  214.  
  215. 0F 33/r    LODBITS rb,rb N Load AX with DS:SI,bit rb (incr. SI,rb), rb+1 bits
  216. 0F 3B/0 ib LODBITS rb,ib N Load AX with DS:SI,bit rb (incr. SI,rb), ib+1 bits
  217. AC         LODS mb         Load byte [SI] into AL, advance SI
  218. AD         LODS mv         Load vword [SI] into eAX, advance SI
  219. AC         LODSB           Load byte [SI] into AL, advance SI
  220. AD         LODSD           Load dword [SI] into EAX, advance SI
  221. AD         LODSW           Load word [SI] into AX, advance SI
  222.                                                              6-13
  223.  
  224. E2 cb      LOOP cb         noflags DEC CX; jump short if CX>0
  225. E1 cb      LOOPE cb        noflags DEC CX; jump short if CX>0 and equal (ZF=1)
  226. E0 cb      LOOPNE cb       noflags DEC CX; jump short if CX>0 and not equal
  227. E0 cb      LOOPNZ cb       noflags DEC CX; jump short if CX>0 and ZF=0
  228. E1 cb      LOOPZ cb        noflags DEC CX; jump short if CX>0 and zero (ZF=1)
  229.  
  230. 0F 03 /r   LSL rv,ev     2 Load: rv = Segment Limit, selector ew
  231. 0F B2 /r   LSS rv,ep     3 Load EA pointer into SS and vword register
  232. 0F 00 /3   LTR ew        2 Load EA word into Task Register
  233.  
  234. A0 iv      MOV AL,xb       Move byte variable (offset iv) into AL
  235. A1 iv      MOV eAX,xv      Move vword variable (offset iv) into eAX
  236. 0F 22 /4   MOV CR4,rd    5 Move rd into control register 4
  237. 0F 22 /n   MOV CRn,rd    3 Move rd into control register n (=0,2, or 3)
  238.  
  239. 0F 23 /n   MOV DRn,rd    3 Move rd into debug register n (=0,1,2,3)
  240. 0F 23 /n   MOV DRn,rd    3 Move rd into debug register n (=6,7)
  241. 0F 26 /n   MOV TRn,rd    3 Move rd into test register TRn (=6,7)
  242. 8E /3      MOV DS,mw       Move memory word into DS
  243. 8E /3      MOV DS,rw       Move word register into DS
  244.  
  245. C6 /0 ib   MOV eb,ib       Move immediate byte into EA byte
  246. 88 /r      MOV eb,rb       Move byte register into EA byte
  247. 8E /0      MOV ES,mw       Move memory word into ES
  248. 8E /0      MOV ES,rw       Move word register into ES
  249.  
  250. 8C /1      MOV ew,CS       Move CS into EA word
  251. 8C /3      MOV ew,DS       Move DS into EA word
  252. C7 /0 iv   MOV ev,iv       Move immediate vword into EA vword
  253. 8C /0      MOV ew,ES       Move ES into EA word
  254. 89 /r      MOV ev,rv       Move vword register into EA vword
  255.  
  256. 8C /2      MOV ew,SS       Move SS into EA word
  257. B0+rb ib   MOV rb,ib       Move immediate byte into byte register
  258. 8A /r      MOV rb,eb       Move EA byte into byte register
  259. 0F 20 /4   MOV rd,CR4    5 Move control register 4 into rd
  260. 0F 20 /n   MOV rd,CRn    3 Move control register n (=0,2, or 3) into rd
  261.  
  262. 0F 21 /n   MOV rd,DRn    3 Move debug register n (=0,1,2,3) into rd
  263. 0F 21 /n   MOV rd,DRn    3 Move debug register n (=6,7) into rd
  264. 0F 24 /n   MOV rd,TRn    3 Move test register TRn (=6,7) into rd
  265. B8+rw iv   MOV rv,iv       Move immediate vword into vword register
  266. 8B /r      MOV rv,ev       Move EA vword into vword register
  267.  
  268. 8E /2      MOV SS,mw       Move memory word into SS
  269. 8E /2      MOV SS,rw       Move word register into SS
  270. A2 iv      MOV xb,AL       Move AL into byte variable (offset iv)
  271. A3 iv      MOV xv,eAX      Move eAX into vword register (offset iv)
  272. A4         MOVS mb,mb      Move byte [SI] to ES:[DI], advance SI,DI
  273. A5         MOVS mv,mv      Move vword [SI] to ES:[DI], advance SI,DI
  274. A4         MOVSB           Move byte DS:[SI] to ES:[DI], advance SI,DI
  275. A5         MOVSD         3 Move dword DS:[SI] to ES:[DI], advance SI,DI
  276. A5         MOVSW           Move word DS:[SI] to ES:[DI], advance SI,DI
  277.                                                              6-14
  278.  
  279. 0F BF /r   MOVSX rd,ew   3 Move word to dword, with sign-extend
  280. 0F BE /r   MOVSX rv,eb   3 Move byte to vword, with sign-extend
  281. 0F B7 /r   MOVZX rd,ew   3 Move word to dword, with zero-extend
  282. 0F B6 /r   MOVZX rv,eb   3 Move byte to vword, with zero-extend
  283.  
  284.  
  285.  
  286.  
  287. F6 /4      MUL eb          Unsigned multiply (AX = AL * EA byte)
  288. F7 /4      MUL ev          Unsigned multiply (eDXeAX = eAX * EA vword)
  289. F6 /3      NEG eb          Two's complement negate EA byte
  290. F7 /3      NEG ev          Two's complement negate EA vword
  291.            NIL (prefix)    Special "do-nothing" opcode assembles no code
  292. 90         NOP             No Operation
  293.  
  294. F6 /2      NOT eb          Reverse each bit of EA byte
  295. F7 /2      NOT ev          Reverse each bit of EA word
  296. 0F 16/0    NOTBIT eb,CL  N  Complement bit CL of eb
  297. 0F 17/0    NOTBIT ew,CL  N  Complement bit CL of ew
  298. 0F 1E/0 ib NOTBIT eb,ib  N Complement bit ib of eb
  299. 0F 1F/0 ib NOTBIT ew,ib  N Complement bit ib of ew
  300.  
  301. 66 or nil  O2 (prefix)   3 Use 16-bit data operand in the next instruction
  302. 66 or nil  O4 (prefix)   3 Use 32-bit data operand in the next instruction
  303. 0C ib      OR AL,ib        Logical-OR immediate byte into AL
  304. 0D iv      OR eAX,iv       Logical-OR immediate word into eAX
  305. 80 /1 ib   OR eb,ib        Logical-OR immediate byte into EA byte
  306. 08 /r      OR eb,rb        Logical-OR byte register into EA byte
  307. 83 /1 ib   OR ev,ib        Logical-OR immediate byte into EA word
  308. 81 /1 iv   OR ev,iv        Logical-OR immediate word into EA word
  309. 09 /r      OR ev,rv        Logical-OR word register into EA word
  310. 0A /r      OR rb,eb        Logical-OR EA byte into byte register
  311. 0B /r      OR rv,ev        Logical-OR EA word into word register
  312.  
  313. E6 ib      OUT ib,AL       Output byte AL to immediate port number ib
  314. E7 ib      OUT ib,eAX      Output word eAX to immediate port number ib
  315. EE         OUT DX,AL       Output byte AL to port number DX
  316. EF         OUT DX,eAX      Output word eAX to port number DX
  317. 6E         OUTS DX,eb    1 Output byte [SI] to port number DX, advance SI
  318. 6F         OUTS DX,ev    1 Output word [SI] to port number DX, advance SI
  319. 6E         OUTSB         1 Output byte DS:[SI] to port number DX, advance SI
  320. 6F         OUTSD         3 Output dword DS:[SI] to port number DX, advance SI
  321. 6F         OUTSW         1 Output word DS:[SI] to port number DX, advance SI
  322.  
  323. 1F         POP DS          Set DS to top of stack, increment SP by 2
  324. 07         POP ES          Set ES to top of stack, increment SP by 2
  325. 0F A1      POP FS        3 Set FS to top of stack, increment SP by 2
  326. 0F A9      POP GS        3 Set GS to top of stack, increment SP by 2
  327. 8F /0      POP mv          Set memory word to top of stack, increment SP by 2
  328. 58+rw      POP rv          Set word register to top of stack, increment SP by 2
  329. 17         POP SS          Set SS to top of stack, increment SP by 2
  330.  
  331. 61         POPA          1 Pop DI,SI,BP,SP,BX,DX,CX,AX (SP value is ignored)
  332. 61         POPAD         3 Pop EDI,ESI,EBP,x,EBX,EDX,ECX,EAX (ESP ign.)
  333. 9D         POPF            Set flags register to top of stack, increment SP by 2
  334. 9D         POPFD         3 Set eflags reg to top of stack, incr SP by 2
  335.                                                              6-15
  336.  
  337. 0E         PUSH CS         Set [SP-2] to CS, then decrement SP by 2
  338. 1E         PUSH DS         Set [SP-2] to DS, then decrement SP by 2
  339. 06         PUSH ES         Set [SP-2] to ES, then decrement SP by 2
  340. 0F A0      PUSH FS       3 Set [SP-2] to FS, then decrement SP by 2
  341. 0F A8      PUSH GS       3 Set [SP-2] to GS, then decrement SP by 2
  342. 6A ib      PUSH ib       1 Push sign-extended immediate byte
  343. 68 iv      PUSH iv       1 Set [SP-2] to immediate word, then decrement SP by 2
  344. FF /6      PUSH mv         Set [SP-2] to memory word, then decrement SP by 2
  345. 50+rw      PUSH rv         Set [SP-2] to word register, then decrement SP by 2
  346. 16         PUSH SS         Set [SP-2] to SS, then decrement SP by 2
  347.  
  348. 60         PUSHA         1 Push AX,CX,DX,BX,original SP,BP,SI,DI
  349. 60         PUSHAD        3 Push EAX,ECX,EDX,EBX,original ESP,EBP,ESI,EDI
  350. 9C         PUSHF           Set [SP-2] to flags register, then decrement SP by 2
  351. 9C         PUSHFD        3 Set [SP-4] to eflags reg, then decr SP by 4
  352.  
  353. D0 /2      RCL eb,1        Rotate 9-bit quantity (CF, EA byte) left once
  354. D2 /2      RCL eb,CL       Rotate 9-bit quantity (CF, EA byte) left CL times
  355. C0 /2 ib   RCL eb,ib     1 Rotate 9-bit quantity (CF, EA byte) left ib times
  356. D1 /2      RCL ev,1        Rotate v+1-bit quantity (CF, EA word) left once
  357. D3 /2      RCL ev,CL       Rotate v+1-bit quantity (CF, EA word) left CL times
  358. C1 /2 ib   RCL ev,ib     1 Rotate v+1-bit quantity (CF, EA word) left ib times
  359.  
  360. D0 /3      RCR eb,1        Rotate 9-bit quantity (CF, EA byte) right once
  361. D2 /3      RCR eb,CL       Rotate 9-bit quantity (CF, EA byte) right CL times
  362. C0 /3 ib   RCR eb,ib     1 Rotate 9-bit quantity (CF, EA byte) right ib times
  363. D1 /3      RCR ev,1        Rotate v+1-bit quantity (CF, EA word) right once
  364. D3 /3      RCR ev,CL       Rotate v+1-bit quantity (CF, EA word) right CL times
  365. C1 /3 ib   RCR ev,ib     1 Rotate v+1-bit quantity (CF, EA word) right ib times
  366. 0F 32      RDMSR         5 Read Model Specific Reg #ECX to EDXEAX
  367. 0F 31      RDTSC         5 Read Time Stamp Counter to EDXEAX
  368.  
  369. F3         REP (prefix)    Repeat following MOVS,LODS,STOS,INS, or OUTS CX times
  370. 65         REPC (prefix) N Repeat following CMPS or SCAS CX times or until CF=0
  371. F3         REPE (prefix)   Repeat following CMPS or SCAS CX times or until ZF=0
  372. 64         REPNC (prfix) N Repeat following CMPS or SCAS CX times or until CF=1
  373. F2         REPNE (prfix)   Repeat following CMPS or SCAS CX times or until ZF=1
  374. F2         REPNZ (prfix)   Repeat following CMPS or SCAS CX times or until ZF=1
  375. F3         REPZ (prefix)   Repeat following CMPS or SCAS CX times or until ZF=0
  376.  
  377. CB         RETF            Return to far caller (pop offset, then seg)
  378. C3         RET             Return to near caller (pop offset only)
  379. CA iw      RETF iw         RET (far), pop offset, seg, iw bytes
  380. C2 iw      RET iw          RET (near), pop offset, iw bytes pushed before Call
  381.  
  382. D0 /0      ROL eb,1        Rotate 8-bit EA byte left once
  383. D2 /0      ROL eb,CL       Rotate 8-bit EA byte left CL times
  384. C0 /0 ib   ROL eb,ib     1 Rotate 8-bit EA byte left ib times
  385. D1 /0      ROL ev,1        Rotate 16- or 32-bit EA vword left once
  386. D3 /0      ROL ev,CL       Rotate 16- or 32-bit EA vword left CL times
  387. C1 /0 ib   ROL ev,ib     1 Rotate 16 or 32-bit EA vword left ib times
  388. 0F 28/0    ROL4 eb       N Rotate nibbles: Heb=Leb   HAL,Leb=LAL  LAL=Heb
  389.                                                              6-16
  390.  
  391. D0 /1      ROR eb,1        Rotate 8-bit EA byte right once
  392. D2 /1      ROR eb,CL       Rotate 8-bit EA byte right CL times
  393. C0 /1 ib   ROR eb,ib     1 Rotate 8-bit EA byte right ib times
  394. D1 /1      ROR ev,1        Rotate 16- or 32-bit EA vword right once
  395. D3 /1      ROR ev,CL       Rotate 16- or 32-bit EA vword right CL times
  396. C1 /1 ib   ROR ev,ib     1 Rotate 16- or 32-bit EA vword right ib times
  397. 0F 2A/0    ROR4 eb       N Rotate nibbles: Leb=Heb   Heb=LAL  AL=eb
  398. 0F AA      RSM           5 Resume from System Management mode
  399.  
  400. 9E         SAHF            Store AH into flags  SF ZF xx AF xx PF xx CF
  401. D0 /4      SAL eb,1        Multiply EA byte by 2, once
  402. D2 /4      SAL eb,CL       Multiply EA byte by 2, CL times
  403. C0 /4 ib   SAL eb,ib     1 Multiply EA byte by 2, ib times
  404. D1 /4      SAL ev,1        Multiply EA vword by 2, once
  405. D3 /4      SAL ev,CL       Multiply EA vword by 2, CL times
  406. C1 /4 ib   SAL ev,ib     1 Multiply EA vword by 2, ib times
  407.  
  408. D0 /7      SAR eb,1        Signed divide EA byte by 2, once
  409. D2 /7      SAR eb,CL       Signed divide EA byte by 2, CL times
  410. C0 /7 ib   SAR eb,ib     1 Signed divide EA byte by 2, ib times
  411. D1 /7      SAR ev,1        Signed divide EA vword by 2, once
  412. D3 /7      SAR ev,CL       Signed divide EA vword by 2, CL times
  413. C1 /7 ib   SAR ev,ib     1 Signed divide EA vword by 2, ib times
  414.  
  415. 1C ib      SBB AL,ib       Subtract with borrow immediate byte from AL
  416. 1D iv      SBB eAX,iv      Subtract with borrow immediate word from eAX
  417. 80 /3 ib   SBB eb,ib       Subtract with borrow immediate byte from EA byte
  418. 18 /r      SBB eb,rb       Subtract with borrow byte register from EA byte
  419. 83 /3 ib   SBB ev,ib       Subtract with borrow immediate byte from EA word
  420. 81 /3 iv   SBB ev,iv       Subtract with borrow immediate word from EA word
  421. 19 /r      SBB ev,rv       Subtract with borrow word register from EA word
  422. 1A /r      SBB rb,eb       Subtract with borrow EA byte from byte register
  423. 1B /r      SBB rv,ev       Subtract with borrow EA word from word register
  424.  
  425. AE         SCAS mb         Compare bytes AL - ES:[DI], advance DI
  426. AF         SCAS mv         Compare vwords eAX - ES:[DI], advance DI
  427. AE         SCASB           Compare bytes AL - ES:[DI], advance DI
  428. AF         SCASD           Compare dwords EAX - ES:[DI], advance DI
  429. AF         SCASW           Compare words AX - ES:[DI], advance DI
  430.  
  431. 0F 14/0    SETBIT eb,CL  N Set bit CL of eb
  432. 0F 15/0    SETBIT ew,CL  N Set bit CL of ew
  433. 0F 1C/0 ib SETBIT eb,ib  N Set bit ib of eb
  434. 0F 1D/0 ib SETBIT ew,ib  N Set bit ib of ew
  435. 0F 9n /r   SETcond eb    3 Set eb byte to 1 if condition, 0 if not
  436. 0F 01 /0   SGDT m        2 Store 6-byte Global Descriptor Table register to M
  437.  
  438. D0 /4      SHL eb,1        Multiply EA byte by 2, once
  439. D2 /4      SHL eb,CL       Multiply EA byte by 2, CL times
  440. C0 /4 ib   SHL eb,ib     1 Multiply EA byte by 2, ib times
  441. D1 /4      SHL ev,1        Multiply EA word by 2, once
  442. D3 /4      SHL ev,CL       Multiply EA word by 2, CL times
  443. C1 /4 ib   SHL ev,ib     1 Multiply EA word by 2, ib times
  444.  
  445. 0F A5/r    SHLD ev,rv,CL 3 Set ev to high of ((ev,rv) SHL CL)
  446. 0F A4/r ib SHLD ev,rv,ib 3 Set ev to high of ((ev,rv) SHL ib)
  447.                                                              6-17
  448.  
  449. D0 /5      SHR eb,1        Unsigned divide EA byte by 2, once
  450. D2 /5      SHR eb,CL       Unsigned divide EA byte by 2, CL times
  451. C0 /5 ib   SHR eb,ib     1 Unsigned divide EA byte by 2, ib times
  452. D1 /5      SHR ev,1        Unsigned divide EA word by 2, once
  453. D3 /5      SHR ev,CL       Unsigned divide EA word by 2, CL times
  454. C1 /5 ib   SHR ev,ib     1 Unsigned divide EA word by 2, ib times
  455. 0F AD/r    SHRD ev,rv,CL 3 Set ev to low of ((rv,ev) SHR CL)
  456. 0F AC/r ib SHRD ev,rv,ib 3 Set ev to low of ((rv,ev) SHR ib)
  457.  
  458. 0F 01 /1   SIDT m        2 Store 6-byte Interrupt Descriptor Table register to M
  459. 0F 00 /0   SLDT ew       2 Store Local Descriptor Table register to EA word
  460. 0F 01 /4   SMSW ew       2 Store Machine Status Word to EA word
  461. 36         SS              Use SS segment for the following memory reference
  462. F9         STC             Set carry flag
  463. FD         STD             Set direction flag so SI and DI will decrement
  464. FB         STI             Set interrupt enable flag, interrupts enabled
  465.  
  466. 0F 31/r    STOBITS rb,rb N Store AX to ES:DI,bit rb (incr. DI,rb), rb+1 bits
  467. 0F 39/0 ib STOBITS rb,ib N Store AX to ES:DI,bit rb (incr. DI,rb), ib+1 bits
  468. AA         STOS mb         Store AL to byte [DI], advance DI
  469. AB         STOS mv         Store eAX to word [DI], advance DI
  470. AA         STOSB           Store AL to byte ES:[DI], advance DI
  471. AB         STOSD           Store EAX to dword ES:[DI], advance DI
  472. AB         STOSW           Store AX to word ES:[DI], advance DI
  473. 0F 00 /1   STR ew        2 Store Task Register to EA word
  474.  
  475. 2C ib      SUB AL,ib       Subtract immediate byte from AL
  476. 2D iv      SUB eAX,iv      Subtract immediate word from eAX
  477. 80 /5 ib   SUB eb,ib       Subtract immediate byte from EA byte
  478. 28 /r      SUB eb,rb       Subtract byte register from EA byte
  479. 83 /5 ib   SUB ev,ib       Subtract immediate byte from EA word
  480. 81 /5 iv   SUB ev,iv       Subtract immediate word from EA word
  481. 29 /r      SUB ev,rv       Subtract word register from EA word
  482. 2A /r      SUB rb,eb       Subtract EA byte from byte register
  483. 2B /r      SUB rv,ev       Subtract EA word from word register
  484. 0F 22      SUB4S         N Sub CL nibbles BCD, DS:SI - ES:DI (CL even,NZ)
  485.  
  486. A8 ib      TEST AL,ib      AND immediate byte into AL for flags only
  487. A9 iv      TEST eAX,iv     AND immediate word into eAX for flags only
  488. F6 /0 ib   TEST eb,ib      AND immediate byte into EA byte for flags only
  489. 84 /r      TEST eb,rb      AND byte register into EA byte for flags only
  490. F7 /0 iv   TEST ev,iv      AND immediate word into EA word for flags only
  491. 85 /r      TEST ev,rv      AND word register into EA word for flags only
  492. 84 /r      TEST rb,eb      AND EA byte into byte register for flags only
  493. 85 /r      TEST rv,ev      AND EA word into word register for flags only
  494.  
  495. 0F 10/0    TESTBIT eb,CL N Test bit CL of eb, set Z flag
  496. 0F 11/0    TESTBIT ev,CL N Test bit CL of ew, set Z flag
  497. 0F 18/0 ib TESTBIT eb,ib N Test bit ib of eb, set Z flag
  498. 0F 19/0 ib TESTBIT ew,ib N Test bit ib of ew, set Z flag
  499.                                                              6-18
  500.  
  501. 0F 00 /4   VERR ew       2 Set ZF=1 if segment can be read, selector ew
  502. 0F 00 /5   VERW ew       2 Set ZF=1 if segment can be written to, selector ew
  503. 9B         WAIT            Wait until BUSY pin is inactive (HIGH)
  504. 0F 09      WBINVD        4 Write Back and Invalidate the Data Cache
  505. 0F 30      WRMSR         5 Write EDXEAX to Model Specific Reg #ECX
  506. 0F C0 /r   XADD eb,rb    4 Exchange eb with rb then add into new eb
  507. 0F C1 /r   XADD ev,rv    4 Exchange ev with rv then add into new ev
  508.  
  509. 9r         XCHG eAX,rv     Exchange word register with eAX
  510. 86 /r      XCHG eb,rb      Exchange byte register with EA byte
  511. 87 /r      XCHG ev,rv      Exchange word register with EA word
  512. 86 /r      XCHG rb,eb      Exchange EA byte with byte register
  513. 9r         XCHG rv,eAX     Exchange  with word register
  514. 87 /r      XCHG rv,ev      Exchange EA word with word register
  515.  
  516. D7         XLAT mb         Set AL to memory byte [BX + unsigned AL]
  517. D7         XLATB           Set AL to memory byte DS:[BX + unsigned AL]
  518. 34 ib      XOR AL,ib       Exclusive-OR immediate byte into AL
  519. 35 iv      XOR eAX,iv      Exclusive-OR immediate word into eAX
  520. 80 /6 ib   XOR eb,ib       Exclusive-OR immediate byte into EA byte
  521. 30 /r      XOR eb,rb       Exclusive-OR byte register into EA byte
  522. 83 /6 ib   XOR ev,ib       Exclusive-OR immediate byte into EA word
  523. 81 /6 iv   XOR ev,iv       Exclusive-OR immediate word into EA word
  524. 31 /r      XOR ev,rv       Exclusive-OR word register into EA word
  525. 32 /r      XOR rb,eb       Exclusive-OR EA byte into byte register
  526. 33 /r      XOR rv,ev       Exclusive-OR EA word into word register
  527.  
  528.  
  529. "N" next to the instruction description means that instruction works only
  530. on NEC chips.  A digit x means that instruction works only on the x86
  531. or later processor.  See the note just before the chart.
  532.  
  533.